﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Parallel3M.parallel3m.framework
{
    public class ParallelConnection
    {
        public string id;
        public string name;
        public ParallelElement from;
        public ParallelElement to;
        public String routeTag=PAYLOADCONSTRANT.DEFAULT_ROUTETAG;
        
        public void Flowin(ParallelPayload payload)
        {
            ParallelChannel channel = (ParallelChannel)to;
            channel.AddPayload(payload);
            
        }

        public ParallelPayload Flowout()
        {
            ParallelChannel channel = (ParallelChannel)from;
            ParallelPayload payload=channel.GetPayload();
            return payload;
        }

    }
}
